<?php
global $_GPC, $_W;
$GLOBALS['frames'] = $this->getMainMenu();
$help = pdo_fetchall("SELECT * FROM " . tablename('zh_gjw_help')  . " WHERE uniacid=".$_W['uniacid']."  ORDER BY sort DESC");
$op = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
if($op=='delete'){
	$res=pdo_delete('zh_gjw_help',array('id'=>$_GPC['id']));
	// var_dump($res);die;
	if($res){
	  message('删除成功',$this->createWebUrl('help',array()),'success');
	}else{
	  message('删除失败','','error');
	}
}
if($_GPC['op']=='hoty'){
	$res=pdo_update('zh_gjw_help',array('state'=>0),array('id'=>$_GPC['id']));
	if($res){
     message('', 'referer', 'success');
		// iajax('200','成功',$this->createWebUrl('activehelp'), 'ajax', false);
    }else{
          message('失败！','','error');
    }
}
if($_GPC['op']=='hotx'){
	$res=pdo_update('zh_gjw_help',array('state'=>1),array('id'=>$_GPC['id']));
	if($res){
     message('', 'referer', 'success');
    }else{
          message('失败！','','error');
    }
}
include $this->template('web/help');